DOC-14373 2.2 features in 1.1 SDK#4
Conversation
Clarified the description of the new async API and its introduction in the 2.2 release.
|
|
||
| == Long Running Queries | ||
|
|
||
| All versions of Enterprise Analytics support client-side async requests. |
There was a problem hiding this comment.
All versions of Enterprise Analytics support client-side async requests.
I would not be comfortable claiming the EA JVM SDK's startQuery method is guaranteed to work with EA servers older than 2.2. We haven't tested it, as far as I know.
| After the query request is submitted, clients can monitor the status of the request and on successful execution of query, opt to stream the results of the query. | ||
| This way the connection between SDK client and Analytics Server does not stay open for the long duration of query processing, and is only needed for result set streaming. | ||
|
|
||
| `cluster.StartQueryAsync()` → `QueryHandle` → `QueryStatus` → `QueryResultsHandle` |
There was a problem hiding this comment.
In the Java SDK, the name of the method that kicks it off is startQuery (not StartQueryAsync).
Also notable, the user can call startQuery on a cluster or a scope.
I would be in favor of removing this line and letting the flow in the example speak for itself.
Ditto in the other place this text occurs, in the connstr.adoc partial.
| == Connecting and Executing a Query | ||
|
|
||
|
|
||
| The 1.1 {name-sdk} adds support for JWT and client certificate authentication, as well as a new "async" poll-based API that uses request handles to fetch results. |
There was a problem hiding this comment.
"async" -> Should we refer to this API as the "startQuery" API, because that's the name of the method?
Ditto everywhere else we refer to the "async" server API.
| var credential = Jwt.Create(Credential token); | ||
| public static Cluster Create(string connectionString, Credential credential); |
There was a problem hiding this comment.
var credential = Credential.ofJwt("...");
var cluster = Cluster.newInstance(connectionString, credential);
| [source,java] | ||
| ---- | ||
| var credential = ClientCertificate.FromPem(certPath, keyPath); | ||
| public static Cluster Create(string connectionString, Credential credential); |
There was a problem hiding this comment.
var credential = Credential.fromKeyStore(
Paths.get("path/to/client-cert-and-key.p12"),
password
);
var cluster = Cluster.newInstance(connectionString, credential);
|
|
||
| == Certificate Authority | ||
|
|
||
| To make a TLS connection to an Enterprise Analytics cluster with a root certificate issued by a trusted CA (Certificate Authority), you do not need to add this to your configuration -- |
There was a problem hiding this comment.
I would replace this section with something like:
By default, the Analytics SDK trusts the same well-known Certificate Authorities (CAs) as the JVM, plus the Couchbase Capella CA. This works for most deployments.
If you need to trust a different CA, or want to trust only a specific CA, you can override the default trust settings by telling the Analytics SDK which CA certificates to trust.
var cluster = Cluster.newInstance(
connectionString,
credential,
options -> options
.security(sec -> sec.trustOnlyPemFile(Paths.get("path/to/ca.pem")))
);
No description provided.